﻿@model IEnumerable<ENT_Piatto>
@using WebApp.Models
@using WebApp.Extensions
@using Telerik.Web.Mvc.UI
@{
    Layout = "_Layout.cshtml";
}
@{
    ViewBag.Title = "Tavolo: " + ViewBag.SET_Ordine.Tavoli;
}
@(Html.Telerik().Menu()
        .Name("Menu")
        .BindTo(SelectListHandler.ENT_Gruppo(), 
        mappings => mappings.For<SelectListItem>(
            binding => binding.ItemDataBound((item, data) =>
                {
                    item.Text = data.Text;
                    item.Url = Url.Action("ORD_CMD_SEL", "Tavoli", new { f0 = ViewBag.SET_Ordine.Guid, f1 = data.Value, });
                }))))

<div class="dashboard">
    @foreach (var item in Model)
    {
        <div class="j-panel j-table j-green" onclick="location.href = '@Url.Action("ORD_CMD_ADD", "Tavoli", new { f0 = ViewBag.SET_Ordine.Guid, f1= item.Guid })';">
            <div><b>@item.Nome</b></div>
            <div>(@item.Breve)</div>
        </div>
    }
</div>

@section submenu
{
    <tr>
        <td class="submenu_2" onclick="document.location.href='@Url.Action("ORD_CMD", "Tavoli", new { f0 = ViewBag.SET_Ordine.Guid })'">Comande
        </td>
    </tr>
    <tr>
        <td class="submenu_2" onclick="document.location.href='@Url.Action("ORD_TAV", "Tavoli", new { f0 = ViewBag.SET_Ordine.Guid })'">Tavoli
        </td>
    </tr>
    <tr>
        <td class="submenu_2" onclick="document.location.href='@Url.Action("ORD_PAG", "Tavoli", new { f0 = ViewBag.SET_Ordine.Guid })'">Paga
        </td>
    </tr>
}